{extend name="public/common"} {block name="body"}
<title>基本设置</title>
</head>
<style>
.suglist li{
		cursor: pointer; 
	}
.suglist li:hover{
		background: #f3f3f3;
	}
	.ul_tab {
            height: 40px;
            background-color: #e5e5e5;
    		border-bottom: 1px solid #e4e7ed;
        }

        .ul_tab li {
            position: relative;
            float: left;
            width: 112px;
            height: 40px;
            line-height: 40px;
            text-align: center;
            cursor: pointer;
            margin-left: -1px;
        }

        .ul_tab span {
            position: absolute;
		    right: 0;
		    top: 13px;
		    background: #636363;
		    width: 1px;
		    height: 14px;
		    overflow: hidden;
        }
        .products {
            width: 98%;
		    height: 100%;
		    padding: 20px;
		    margin-top: -9px;
        }

        .products .main {
            float: left;
            display: none;
            width: 100%;
        }

        .products .main.selected {
            display: block;
        }
        .ul_tab li.active {
            border-bottom: 1px solid #fff;
		    background-color: #636363;
		    border-right: 1px solid #ddd;
		    border-left: 1px solid #ddd;
		    color: white !important;
        }
         .active a {
		    color: white;
		}
        
		/*.btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active {
		    color: #636363;
		    background-color: #e5e5e5;
		    border-color: #e5e5e5;
		}*/
		.table-bg thead th {
		     background-color: #ffffff; 
		}
		table tbody tr:hover{
			background-color: #f5f7fa !important; 
		}
		.text{
			height: 44px;
		}
		.text th{
			color: #909399;
			font-size: 14px;
		}
		.text-c td{
			font-size: 14px;
		}
		.tab-item a{
			display: inline-block;
			width: 100%;
			height: 100%;
		}
		a:hover{
			
			text-decoration: none;
		}
		.tab-item a{
			color: #333;	
		}
		
		.table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color:#e5e5e5}
		.text th {
		    color: #909399;
		    font-size: 14px;
		   
		}
		.navbar {
		    background: #3f3f3f;
		}
		/*.text-c td {
		    color: #909399;
		}
		.text-c td a {
		    color: #909399;
		}*/
		
		.dataTables_wrapper .dataTables_paginate .paginate_button:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
		    background: #e5e5e5;
		    color: #636363;
		}
		.ul_tab1 li{
		    width: 113px;
		    height: 33px;
		    line-height: 33px;
		    color: #337ab7;
		}
		.ul_tab1{
			 background-color: #fff; 
    		 border-bottom: 1px solid #e4e7ed;
		}
		.active1{
			color: #333 !important;
		}
		.products .main {
            display: none;
        }
		.products .main.selected {
            display: block;
        }
        .ch_hyz{
        	width: 150px;
		    height: 27px;
		    border: 1px solid #ddd;
        }
        .radius:hover{
 	background:#66b1ff;
 	border-color: #66b1ff;
 	color: #fff;
 }
 span:hover{
 	color: #333;
 }
  .btn-primary {
  	width: 90px;
    color: #fff;
    background-color: #409eff;
    border: 1px solid #409eff;
    height: 31px;
    border-radius: 5px;
    font-size: 14px;
    line-height: 24px !important;
    cursor:pointer;
    margin-left: 10px;
}
 
 .cj_zhezhao{
 	width: 100%;
 	height: 100%;
 	background-color: black;
 	opacity: .3;
 	position: fixed;
    top: 0;
    left: 0;
    display: none;
 }
 .tk_nr{
 	width: 90%;
    height: 700px;
    background-color: white;
    position: absolute;
    left: 5%;
    top: -52px;
    padding: 10px;
    overflow: scroll;
    display: none;
 }
 .cj_gb{
 	display: inline-block;
    width: 25px;
    height: 25px;
    font-size: 16px;
    float: right;
    border: 1px solid #ddd;
    text-align: center;
    border-radius: 5px;
    background-color: #ddd;
    cursor: pointer;
 }
</style>
<body>
  <nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i>
     玩家管理
    <span class="c-gray en">&gt;</span>
    运营管理
    <span class="c-gray en">&gt;</span>
    <a href="javascript:;">消息推送</a>

    
    <a class="btn btn-success radius r"
      style="line-height: 1.6em; margin-top: 3px"
      href="javascript:location.replace(location.href);" title="刷新">
      <i class="Hui-iconfont">&#xe68f;</i>
    </a>
  </nav>
  <div style="padding:20px;height:30px;">
  	
  	<div id="" style="width: 100%;height: auto;background: #fff;border: 1px solid #dcdfe6;-webkit-box-shadow: 0 2px 4px 0 rgba(0,0,0,.12), 0 0 6px 0 rgba(0,0,0,.04); box-shadow: 0 2px 4px 0 rgba(0,0,0,.12), 0 0 6px 0 rgba(0,0,0,.04); overflow: hidden;">
  		<div style="width: 100%;height: 50px;">
		  	<ul class="ul_tab">
		        <li class="tab-item"><a href="{:url('Jpushtest/quanbu')}">全部会员</a><span>◆</span></li>
		        <li class="tab-item"><a href="{:url('Jpushtest/index')}" >部分会员</a><span>◆</span></li>
		        <li class="tab-item active"><a href="{:url('Jpushtest/history')}" style="color: white">历史消息</a></li>
		    </ul>
  		</div>
  		
  		
 			
 			
 			<div class="products">
 				
 				<div class="main selected main1">	  
	                	           
	              <div class="page-container dataTables_wrapper">
				      <div id="tab-system" class="HuiTab">
				        <div class="tabCon" style="display: block;">
				          <div class="mt-20">
				            <table
				              class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
				              <thead>
				                <tr class="text-c text">
				                  <th>id</th>
				                  <th>消息标题</th>
				                  <th>已发会员组</th>
				                  <th>已发人数</th>
				                  <th>发送时间</th>
				                 
				                </tr>
				              </thead>
				              <tbody>
				              {foreach($history as $item)}
				                <tr class="text-c">
				                  <td>{$item.id}</td>
				                  <td>{$item.title}</td>
				                  <td>{if($item.mid==0)}全部推送{else/}{$item.name}{/if}</td>
				                  <td>{if($item.mid==0)}所有用户{else/}{$item.num}{/if}</td>
				                  <td>{$item.fstime|date="Y-m-d H:i:s",###}</td>
				                </tr>
				                {/foreach}
				              </tbody>
				            </table>
				          </div>
				        </div>
				      </div>
						 <div class="dataTables_paginate paging_simple_numbers" style="width:100%;">
						            <span style="float:right;margin-left:-2px;">总共{$history->lastPage()}页  当前第{$history->currentPage()}页 ，共{$history->total()}条</span>
						            <div style="float:left;">{$history->render()}</div>
						    </div>
			  	</div>
			
			  </div>
			
	        
 </div>
  </div>
 
{/block}

{block name="js"}
 
<script type="text/javascript">
function delte(vid){
	$.ajax({
                url:"{:url('Jpushtest/delt')}",
                type:"post",
                data:{'uid':vid},
                success:function(data){
                	$('#zu_'+vid).remove();
                    console.log(data);
                }
            });        
}

	function fav_alert(title,url){
		var index = layer.open({
			type: 2,
			title: title,
			area: ['90%', '90%'],
			content: url
		});
	}
	$(".tab-item1").click(function () {
        $(this).addClass("active1").siblings("li").removeClass("active1");
        $(".main").eq($(this).index()).addClass("selected").siblings("div").removeClass("selected");
     });
     
     $(".cj_ck").click(function(){
     	$(".cj_zhezhao").css('display','block');
     	$(".tk_nr").css('display','block');
     	
     })
     
     $(".cj_zhezhao").click(function(){
     	$(this).css('display','none');
     	$(".tk_nr").css('display','none');
     })
     
     $(".cj_gb").click(function(){
     	$(".cj_zhezhao").css('display','none');
     	$(".tk_nr").css('display','none');
     })
     
     function open_zhixing_4(vid){
	layer.open({
		title:"推送消息",
		content:'<div style="position: relative;"> <span style="position: absolute;top: 3px;">标题：</span> <input type="text" id="title" name="title" placeholder="请输入标题" style="width: 150px;height: 27px;border: 1px solid #ddd;margin-bottom: 15px;margin-left: 43px;    padding-left: 5px;" /></div><div style="position: relative;"><span style="position: absolute;">内容：</span><textarea style="margin-left: 45px;" name="beizhu" id="tuibz" cols="35" rows="5" value=""></textarea></div>',
		yes: function(index, layero){
				var beizhu = $("#tuibz").val();
				var title = $("#title").val();
				window.location.href="/admin/Jpushtest/tuisong?uuid="+vid+"&beizhu="+beizhu+"&title="+title;
			}
		});
	}
     
     
	    var getVal = function(){
	        var $inputArr = $(".ck_checkbox:checked");
	        console.log($inputArr);
	        var result = [];
	        $inputArr.each(function(){
	            result.push($(this).val());
	        });
	        $("#memberid").val(result);
	        $("#xz").html($inputArr.length);
	        $(".cj_zhezhao").css('display','none');
     		$(".tk_nr").css('display','none');
	    }


	</script>
 
{/block}
